<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Flow: log/log.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">Flow<span id="projectnumber">&#160;2.0.0</span>
   </div>
   <div id="projectbrief">Flow project: Full implementation reference.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_9381a7bbd03577d6d8720c7f35c94ffa.html">log</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">log.cpp</div></div>
</div><!--header-->
<div class="contents">
<a href="log_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">/* Flow</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment"> * Copyright 2023 Akamai Technologies, Inc.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment"> *</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="comment"> * Licensed under the Apache License, Version 2.0 (the</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="comment"> * &quot;License&quot;); you may not use this file except in</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="comment"> * compliance with the License.  You may obtain a copy</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span><span class="comment"> * of the License at</span></div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span><span class="comment"> *</span></div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="comment"> *   https://www.apache.org/licenses/LICENSE-2.0</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="comment"> *</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="comment"> * Unless required by applicable law or agreed to in</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="comment"> * writing, software distributed under the License is</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="comment"> * distributed on an &quot;AS IS&quot; BASIS, WITHOUT WARRANTIES OR</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="comment"> * CONDITIONS OF ANY KIND, either express or implied.</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="comment"> * See the License for the specific language governing</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span><span class="comment"> * permissions and limitations under the License. */</span></div>
<div class="line"><a id="l00017" name="l00017"></a><span class="lineno">   17</span><span class="comment"></span> </div>
<div class="line"><a id="l00018" name="l00018"></a><span class="lineno">   18</span><span class="comment">/// @file</span></div>
<div class="line"><a id="l00019" name="l00019"></a><span class="lineno">   19</span><span class="comment"></span><span class="preprocessor">#include &quot;<a class="code" href="log_8hpp.html">flow/log/log.hpp</a>&quot;</span></div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno">   20</span><span class="preprocessor">#include &quot;flow/error/error.hpp&quot;</span></div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="preprocessor">#include &quot;<a class="code" href="util__fwd_8hpp.html">flow/util/util_fwd.hpp</a>&quot;</span></div>
<div class="line"><a id="l00022" name="l00022"></a><span class="lineno">   22</span> </div>
<div class="line"><a id="l00023" name="l00023"></a><span class="lineno">   23</span><span class="keyword">namespace </span><a class="code hl_namespace" href="namespaceflow_1_1log.html">flow::log</a></div>
<div class="line"><a id="l00024" name="l00024"></a><span class="lineno">   24</span>{</div>
<div class="line"><a id="l00025" name="l00025"></a><span class="lineno">   25</span> </div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span><span class="comment">// Global initializations.</span></div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00028" name="l00028"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#ada740b2acb9b14ebf025883245c64357">   28</a></span>boost::thread_specific_ptr&lt;Msg_metadata&gt; <a class="code hl_variable" href="namespaceflow_1_1log.html#ada740b2acb9b14ebf025883245c64357">this_thread_sync_msg_metadata_ptr</a>;</div>
<div class="line"><a id="l00029" name="l00029"></a><span class="lineno">   29</span> </div>
<div class="line"><a id="l00030" name="l00030"></a><span class="lineno">   30</span><span class="comment">// Static initializations.</span></div>
<div class="line"><a id="l00031" name="l00031"></a><span class="lineno">   31</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>boost::thread_specific_ptr&lt;std::string&gt; <a class="code hl_variable" href="classflow_1_1log_1_1Logger.html#a3e00a68f9086f1ef0f4e36b9f23f4d02">Logger::s_this_thread_nickname_ptr</a>;</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="line"><a id="l00034" name="l00034"></a><span class="lineno">   34</span><span class="comment">// Logger implementations.</span></div>
<div class="line"><a id="l00035" name="l00035"></a><span class="lineno">   35</span> </div>
<div class="line"><a id="l00036" name="l00036"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Logger.html#a5600c71ccaa294650c7d34b596d90bf5">   36</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#a5600c71ccaa294650c7d34b596d90bf5">Logger::this_thread_set_logged_nickname</a>(<a class="code hl_typedef" href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">util::String_view</a> thread_nickname, <a class="code hl_class" href="classflow_1_1log_1_1Logger.html">Logger</a>* logger_ptr,</div>
<div class="line"><a id="l00037" name="l00037"></a><span class="lineno">   37</span>                                             <span class="keywordtype">bool</span> also_set_os_name) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>{</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span>  <span class="keyword">using </span>std::string;</div>
<div class="line"><a id="l00040" name="l00040"></a><span class="lineno">   40</span>  <span class="keyword">using </span>boost::system::system_category;</div>
<div class="line"><a id="l00041" name="l00041"></a><span class="lineno">   41</span>  using ::pthread_setname_np;</div>
<div class="line"><a id="l00042" name="l00042"></a><span class="lineno">   42</span>  using ::pthread_self;</div>
<div class="line"><a id="l00043" name="l00043"></a><span class="lineno">   43</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>  <span class="comment">/* Either set or delete (0 means no nickname, which is the original state of things).</span></div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span><span class="comment">   * Note: This value is saved in a thread-local fashion. This has no effect on the</span></div>
<div class="line"><a id="l00046" name="l00046"></a><span class="lineno">   46</span><span class="comment">   * value of s_this_thread_nickname.get() or dereference thereof in any thread except</span></div>
<div class="line"><a id="l00047" name="l00047"></a><span class="lineno">   47</span><span class="comment">   * the one in which we currently execute. */</span></div>
<div class="line"><a id="l00048" name="l00048"></a><span class="lineno">   48</span>  <a class="code hl_variable" href="classflow_1_1log_1_1Logger.html#a3e00a68f9086f1ef0f4e36b9f23f4d02">s_this_thread_nickname_ptr</a>.reset(thread_nickname.empty()</div>
<div class="line"><a id="l00049" name="l00049"></a><span class="lineno">   49</span>                                     ? 0</div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>                                     : <span class="keyword">new</span> <span class="keywordtype">string</span>(thread_nickname));</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00052" name="l00052"></a><span class="lineno">   52</span>  <span class="comment">// Log about it if given an object capable of logging about itself.</span></div>
<div class="line"><a id="l00053" name="l00053"></a><span class="lineno">   53</span>  <span class="keywordflow">if</span> (logger_ptr)</div>
<div class="line"><a id="l00054" name="l00054"></a><span class="lineno">   54</span>  {</div>
<div class="line"><a id="l00055" name="l00055"></a><span class="lineno">   55</span>    <a class="code hl_define" href="log_8hpp.html#ae4b5d4fdd2eb052615620879dd74af95">FLOW_LOG_SET_CONTEXT</a>(logger_ptr, Flow_log_component::S_LOG);</div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    <a class="code hl_define" href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a>(<span class="stringliteral">&quot;Set new thread nickname for current thread ID &quot;</span></div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span>                  <span class="stringliteral">&quot;[&quot;</span> &lt;&lt; util::this_thread::get_id() &lt;&lt; <span class="stringliteral">&quot;].&quot;</span>);</div>
<div class="line"><a id="l00058" name="l00058"></a><span class="lineno">   58</span>  }</div>
<div class="line"><a id="l00059" name="l00059"></a><span class="lineno">   59</span> </div>
<div class="line"><a id="l00060" name="l00060"></a><span class="lineno">   60</span>  <span class="keywordflow">if</span> (also_set_os_name)</div>
<div class="line"><a id="l00061" name="l00061"></a><span class="lineno">   61</span>  {</div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span><span class="preprocessor">#ifndef FLOW_OS_LINUX</span></div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span>    <span class="keyword">static_assert</span>(<span class="keyword">false</span>, <span class="stringliteral">&quot;this_thread_set_logged_nickname() also_set_os_name implementation is for Linux only &quot;</span></div>
<div class="line"><a id="l00064" name="l00064"></a><span class="lineno">   64</span>                           <span class="stringliteral">&quot;for now.&quot;</span>);</div>
<div class="line"><a id="l00065" name="l00065"></a><span class="lineno">   65</span>    <span class="comment">/* `man pthread_setname_np` works in Darwin/Mac but is very short, and there is no `man pthread_getname_np`.</span></div>
<div class="line"><a id="l00066" name="l00066"></a><span class="lineno">   66</span><span class="comment">     * It might work fine for Mac, but it&#39;s untested, and I (ygoldfel) didn&#39;t want to deal with it yet.</span></div>
<div class="line"><a id="l00067" name="l00067"></a><span class="lineno">   67</span><span class="comment">     * In particular it&#39;s unclear if the MAX_PTHREAD_NAME_SZ would apply (it&#39;s not in `man` for Mac)... etc.</span></div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span><span class="comment">     * @todo Look into it. */</span></div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span><span class="preprocessor">#endif</span></div>
<div class="line"><a id="l00070" name="l00070"></a><span class="lineno">   70</span>    <span class="keywordtype">string</span> os_name = thread_nickname.empty() ? <a class="code hl_function" href="namespaceflow_1_1util.html#a685b86585da2fa5186f51854e7ae1561">util::ostream_op_string</a>(util::this_thread::get_id())</div>
<div class="line"><a id="l00071" name="l00071"></a><span class="lineno">   71</span>                                             : string(thread_nickname);</div>
<div class="line"><a id="l00072" name="l00072"></a><span class="lineno">   72</span> </div>
<div class="line"><a id="l00073" name="l00073"></a><span class="lineno">   73</span>    <span class="comment">// See `man pthread_setname_np`.  There is a hard limit on the length of the name, and it is:</span></div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    <span class="keyword">constexpr</span> <span class="keywordtype">size_t</span> MAX_PTHREAD_NAME_SZ = 15;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span>    <span class="keywordflow">if</span> (os_name.size() &gt; MAX_PTHREAD_NAME_SZ)</div>
<div class="line"><a id="l00076" name="l00076"></a><span class="lineno">   76</span>    {</div>
<div class="line"><a id="l00077" name="l00077"></a><span class="lineno">   77</span>      <span class="comment">// As advertised: Truncate.  `man` indicates not doing so shall lead to ERANGE error.</span></div>
<div class="line"><a id="l00078" name="l00078"></a><span class="lineno">   78</span>      os_name.erase(MAX_PTHREAD_NAME_SZ);</div>
<div class="line"><a id="l00079" name="l00079"></a><span class="lineno">   79</span>    }</div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span> </div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span>    <span class="keyword">const</span> <span class="keyword">auto</span> result_code = pthread_setname_np(pthread_self(), os_name.c_str());</div>
<div class="line"><a id="l00082" name="l00082"></a><span class="lineno">   82</span> </div>
<div class="line"><a id="l00083" name="l00083"></a><span class="lineno">   83</span>    <span class="comment">// Log about it if given an object capable of logging about itself.</span></div>
<div class="line"><a id="l00084" name="l00084"></a><span class="lineno">   84</span>    <span class="keywordflow">if</span> (logger_ptr)</div>
<div class="line"><a id="l00085" name="l00085"></a><span class="lineno">   85</span>    {</div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>      <a class="code hl_define" href="log_8hpp.html#ae4b5d4fdd2eb052615620879dd74af95">FLOW_LOG_SET_CONTEXT</a>(logger_ptr, Flow_log_component::S_LOG);</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span>      <span class="keywordflow">if</span> (result_code == -1)</div>
<div class="line"><a id="l00088" name="l00088"></a><span class="lineno">   88</span>      {</div>
<div class="line"><a id="l00089" name="l00089"></a><span class="lineno">   89</span>        <span class="keyword">const</span> <a class="code hl_typedef" href="namespaceflow.html#a29eaaa9d0fac4ce87d8b969222dbed09">Error_code</a> sys_err_code(errno, system_category());</div>
<div class="line"><a id="l00090" name="l00090"></a><span class="lineno">   90</span>        <a class="code hl_define" href="log_8hpp.html#a626c7dc4d3b4dc0b32a8aac8624d66bc">FLOW_LOG_WARNING</a>(<span class="stringliteral">&quot;Unable to set OS thread name to [&quot;</span> &lt;&lt; os_name &lt;&lt; <span class="stringliteral">&quot;], possibly truncated &quot;</span></div>
<div class="line"><a id="l00091" name="l00091"></a><span class="lineno">   91</span>                         <span class="stringliteral">&quot;to [&quot;</span> &lt;&lt; MAX_PTHREAD_NAME_SZ &lt;&lt; <span class="stringliteral">&quot;] characters, via pthread_setname_np().  &quot;</span></div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>                         <span class="stringliteral">&quot;This should only occur due to an overlong name, which we guard against, so this is &quot;</span></div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span>                         <span class="stringliteral">&quot;highly unexpected.  Details follow.&quot;</span>);</div>
<div class="line"><a id="l00094" name="l00094"></a><span class="lineno">   94</span>        <a class="code hl_define" href="error_2error_8hpp.html#a019ee6e90802e444572dd78d312d6e23">FLOW_ERROR_SYS_ERROR_LOG_WARNING</a>();</div>
<div class="line"><a id="l00095" name="l00095"></a><span class="lineno">   95</span>      }</div>
<div class="line"><a id="l00096" name="l00096"></a><span class="lineno">   96</span>      <span class="keywordflow">else</span></div>
<div class="line"><a id="l00097" name="l00097"></a><span class="lineno">   97</span>      {</div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>        <a class="code hl_define" href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a>(<span class="stringliteral">&quot;OS thread name has been set to [&quot;</span> &lt;&lt; os_name &lt;&lt; <span class="stringliteral">&quot;], possibly truncated &quot;</span></div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span>                      <span class="stringliteral">&quot;to [&quot;</span> &lt;&lt; MAX_PTHREAD_NAME_SZ &lt;&lt; <span class="stringliteral">&quot;] characters.&quot;</span>);</div>
<div class="line"><a id="l00100" name="l00100"></a><span class="lineno">  100</span>      }</div>
<div class="line"><a id="l00101" name="l00101"></a><span class="lineno">  101</span>    }</div>
<div class="line"><a id="l00102" name="l00102"></a><span class="lineno">  102</span> </div>
<div class="line"><a id="l00103" name="l00103"></a><span class="lineno">  103</span>    <span class="comment">// We could continue, but it&#39;s indicative of a newly-broken API or misunderstanding of `man`: better to be alerted.</span></div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    assert(result_code != -1);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span>  } <span class="comment">// if (also_set_os_name)</span></div>
<div class="line"><a id="l00106" name="l00106"></a><span class="lineno">  106</span>} <span class="comment">// Logger::this_thread_set_logged_nickname()</span></div>
<div class="line"><a id="l00107" name="l00107"></a><span class="lineno">  107</span> </div>
<div class="line"><a id="l00108" name="l00108"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Logger.html#a93541a6407b8705a76c7a161c5289b10">  108</a></span>std::ostream&amp; <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#a93541a6407b8705a76c7a161c5289b10">Logger::this_thread_logged_name_os_manip</a>(std::ostream&amp; os) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00109" name="l00109"></a><span class="lineno">  109</span>{</div>
<div class="line"><a id="l00110" name="l00110"></a><span class="lineno">  110</span>  <span class="comment">// Reminder: we are an ostream manipulator, invoked like flush or endl: os &lt;&lt; flush;</span></div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span> </div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span>  <span class="comment">/* If there&#39;s a thread nickname, output that. Otherwise default to actual thread ID.</span></div>
<div class="line"><a id="l00113" name="l00113"></a><span class="lineno">  113</span><span class="comment">   * ATTN: This must be consistent with behavior in set_thread_info*().</span></div>
<div class="line"><a id="l00114" name="l00114"></a><span class="lineno">  114</span><span class="comment">   * We could also just use the latter here, but the following is a bit quicker.  @todo Reconsider maybe. */</span></div>
<div class="line"><a id="l00115" name="l00115"></a><span class="lineno">  115</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>  <span class="keyword">auto</span> <span class="keyword">const</span> this_thread_nickname_ptr = <a class="code hl_variable" href="classflow_1_1log_1_1Logger.html#a3e00a68f9086f1ef0f4e36b9f23f4d02">s_this_thread_nickname_ptr</a>.get();</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span>  <span class="keywordflow">if</span> (this_thread_nickname_ptr)</div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>  {</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span>    <span class="keywordflow">return</span> os &lt;&lt; (*this_thread_nickname_ptr);</div>
<div class="line"><a id="l00120" name="l00120"></a><span class="lineno">  120</span>  }</div>
<div class="line"><a id="l00121" name="l00121"></a><span class="lineno">  121</span>  <span class="comment">// else</span></div>
<div class="line"><a id="l00122" name="l00122"></a><span class="lineno">  122</span>  <span class="keywordflow">return</span> os &lt;&lt; util::this_thread::get_id();</div>
<div class="line"><a id="l00123" name="l00123"></a><span class="lineno">  123</span>}</div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span> </div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Logger.html#a1ea9da10a13d3b422ba7162a13d7eeb1">  125</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#a1ea9da10a13d3b422ba7162a13d7eeb1">Logger::set_thread_info</a>(std::string* call_thread_nickname, <a class="code hl_typedef" href="namespaceflow_1_1util.html#a0a4e7b2d3107bd630e0dc0c0b8f2e4de">flow::util::Thread_id</a>* call_thread_id) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00126" name="l00126"></a><span class="lineno">  126</span>{</div>
<div class="line"><a id="l00127" name="l00127"></a><span class="lineno">  127</span>  assert(call_thread_nickname);</div>
<div class="line"><a id="l00128" name="l00128"></a><span class="lineno">  128</span>  assert(call_thread_id);</div>
<div class="line"><a id="l00129" name="l00129"></a><span class="lineno">  129</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>  <span class="comment">/* If there&#39;s a thread nickname, output that. Otherwise default to actual thread ID.</span></div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span><span class="comment">   * ATTN: This must be consistent with behavior in this_thread_logged_name_os_manip(). */</span></div>
<div class="line"><a id="l00132" name="l00132"></a><span class="lineno">  132</span> </div>
<div class="line"><a id="l00133" name="l00133"></a><span class="lineno">  133</span>  <span class="keyword">auto</span> <span class="keyword">const</span> this_thread_nickname_ptr = <a class="code hl_variable" href="classflow_1_1log_1_1Logger.html#a3e00a68f9086f1ef0f4e36b9f23f4d02">s_this_thread_nickname_ptr</a>.get();</div>
<div class="line"><a id="l00134" name="l00134"></a><span class="lineno">  134</span>  <span class="keywordflow">if</span> (this_thread_nickname_ptr)</div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>  {</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span>    *call_thread_nickname = (*this_thread_nickname_ptr);</div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span>  }</div>
<div class="line"><a id="l00138" name="l00138"></a><span class="lineno">  138</span>  <span class="keywordflow">else</span></div>
<div class="line"><a id="l00139" name="l00139"></a><span class="lineno">  139</span>  {</div>
<div class="line"><a id="l00140" name="l00140"></a><span class="lineno">  140</span>    *call_thread_id = util::this_thread::get_id();</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno">  141</span>  }</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span>}</div>
<div class="line"><a id="l00143" name="l00143"></a><span class="lineno">  143</span> </div>
<div class="line"><a id="l00144" name="l00144"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Logger.html#a2d1a0283764e5f85abf00c7cee4c4e19">  144</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#a2d1a0283764e5f85abf00c7cee4c4e19">Logger::set_thread_info_in_msg_metadata</a>(<a class="code hl_struct" href="structflow_1_1log_1_1Msg__metadata.html">Msg_metadata</a>* msg_metadata) <span class="comment">// Static.</span></div>
<div class="line"><a id="l00145" name="l00145"></a><span class="lineno">  145</span>{</div>
<div class="line"><a id="l00146" name="l00146"></a><span class="lineno">  146</span>  assert(msg_metadata);</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>  <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#a1ea9da10a13d3b422ba7162a13d7eeb1">set_thread_info</a>(&amp;msg_metadata-&gt;<a class="code hl_variable" href="structflow_1_1log_1_1Msg__metadata.html#a4588cf8c827944e5379c6ad1fd11d6db">m_call_thread_nickname</a>, &amp;msg_metadata-&gt;<a class="code hl_variable" href="structflow_1_1log_1_1Msg__metadata.html#a278ef30d1bdceb9482c0aef097177c91">m_call_thread_id</a>);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span>}</div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span> </div>
<div class="line"><a id="l00150" name="l00150"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Logger.html#ad6ead44c19a7b15111b2f77656a2ea31">  150</a></span>std::ostream* <a class="code hl_function" href="classflow_1_1log_1_1Logger.html#ad6ead44c19a7b15111b2f77656a2ea31">Logger::this_thread_ostream</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00151" name="l00151"></a><span class="lineno">  151</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00152" name="l00152"></a><span class="lineno">  152</span>  <span class="comment">// Grab the stream used for the current thread by this particular Logger.</span></div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno">  153</span>  <span class="keywordflow">return</span> <a class="code hl_function" href="classflow_1_1log_1_1Thread__local__string__appender.html#a4c67bd1c2f1ccc58288df86abda02d88">Thread_local_string_appender::get_this_thread_string_appender</a>(*this)-&gt;<a class="code hl_function" href="classflow_1_1log_1_1Thread__local__string__appender.html#a64383811f529af676dde0028f61831f7">appender_ostream</a>();</div>
<div class="line"><a id="l00154" name="l00154"></a><span class="lineno">  154</span>}</div>
<div class="line"><a id="l00155" name="l00155"></a><span class="lineno">  155</span> </div>
<div class="line"><a id="l00156" name="l00156"></a><span class="lineno">  156</span><span class="comment">// Component implementations.</span></div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno">  157</span> </div>
<div class="line"><a id="l00158" name="l00158"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Component.html#a8c746035d0eea4a26d0982eabf63b713">  158</a></span><a class="code hl_function" href="classflow_1_1log_1_1Component.html#a8c746035d0eea4a26d0982eabf63b713">Component::Component</a>() :</div>
<div class="line"><a id="l00159" name="l00159"></a><span class="lineno">  159</span>  m_payload_type_or_null(0) <span class="comment">// &lt;=&gt; empty() == true.</span></div>
<div class="line"><a id="l00160" name="l00160"></a><span class="lineno">  160</span>{</div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno">  161</span>  <span class="comment">// That&#39;s it.  m_payload_enum_raw_value is uninitialized.</span></div>
<div class="line"><a id="l00162" name="l00162"></a><span class="lineno">  162</span>}</div>
<div class="line"><a id="l00163" name="l00163"></a><span class="lineno">  163</span> </div>
<div class="line"><a id="l00164" name="l00164"></a><span class="lineno">  164</span><a class="code hl_function" href="classflow_1_1log_1_1Component.html#a8c746035d0eea4a26d0982eabf63b713">Component::Component</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; src) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno">  165</span><a class="code hl_function" href="classflow_1_1log_1_1Component.html#a8c746035d0eea4a26d0982eabf63b713">Component::Component</a>(<a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp;&amp; src_moved) = <span class="keywordflow">default</span>; <span class="comment">// Note it doesn&#39;t empty()-ify src_moved.</span></div>
<div class="line"><a id="l00166" name="l00166"></a><span class="lineno">  166</span><a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; <a class="code hl_function" href="classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e">Component::operator=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; src) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00167" name="l00167"></a><span class="lineno">  167</span><a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; <a class="code hl_function" href="classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e">Component::operator=</a>(<a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp;&amp; src_moved) = <span class="keywordflow">default</span>; <span class="comment">// Note it doesn&#39;t empty()-ify src_moved.</span></div>
<div class="line"><a id="l00168" name="l00168"></a><span class="lineno">  168</span> </div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">  169</a></span><span class="keywordtype">bool</span> <a class="code hl_function" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">Component::empty</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00170" name="l00170"></a><span class="lineno">  170</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00171" name="l00171"></a><span class="lineno">  171</span>  <span class="keywordflow">return</span> !<a class="code hl_variable" href="classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac">m_payload_type_or_null</a>;</div>
<div class="line"><a id="l00172" name="l00172"></a><span class="lineno">  172</span>}</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno">  173</span> </div>
<div class="line"><a id="l00174" name="l00174"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Component.html#a3ff8ff4d75add447b3e10ded5430833d">  174</a></span><span class="keyword">const</span> std::type_info&amp; <a class="code hl_function" href="classflow_1_1log_1_1Component.html#a3ff8ff4d75add447b3e10ded5430833d">Component::payload_type</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00175" name="l00175"></a><span class="lineno">  175</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00176" name="l00176"></a><span class="lineno">  176</span>  assert(!<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">empty</a>()); <span class="comment">// We advertised undefined behavior in this case.</span></div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno">  177</span>  <span class="keywordflow">return</span> *<a class="code hl_variable" href="classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac">m_payload_type_or_null</a>;</div>
<div class="line"><a id="l00178" name="l00178"></a><span class="lineno">  178</span>}</div>
<div class="line"><a id="l00179" name="l00179"></a><span class="lineno">  179</span> </div>
<div class="line"><a id="l00180" name="l00180"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Component.html#a899a7d2b0c5daa8e4d666d431b9bf48e">  180</a></span><a class="code hl_typedef" href="classflow_1_1log_1_1Component.html#a287888e2943b312f4febc3e8e130fc80">Component::enum_raw_t</a> <a class="code hl_function" href="classflow_1_1log_1_1Component.html#a899a7d2b0c5daa8e4d666d431b9bf48e">Component::payload_enum_raw_value</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno">  181</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00182" name="l00182"></a><span class="lineno">  182</span>  assert(!<a class="code hl_function" href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">empty</a>()); <span class="comment">// We advertised undefined behavior in this case.</span></div>
<div class="line"><a id="l00183" name="l00183"></a><span class="lineno">  183</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6">m_payload_enum_raw_value</a>;</div>
<div class="line"><a id="l00184" name="l00184"></a><span class="lineno">  184</span>}</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno">  185</span> </div>
<div class="line"><a id="l00186" name="l00186"></a><span class="lineno">  186</span><span class="comment">// Log_context implementations.</span></div>
<div class="line"><a id="l00187" name="l00187"></a><span class="lineno">  187</span> </div>
<div class="line"><a id="l00188" name="l00188"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">  188</a></span><a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context::Log_context</a>(<a class="code hl_class" href="classflow_1_1log_1_1Logger.html">Logger</a>* logger) :</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno">  189</span>  m_logger(logger)</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span>{</div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span>  <span class="comment">// Nothing.</span></div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>}</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span> </div>
<div class="line"><a id="l00194" name="l00194"></a><span class="lineno">  194</span><a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context::Log_context</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; src) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00195" name="l00195"></a><span class="lineno">  195</span> </div>
<div class="line"><a id="l00196" name="l00196"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#a3d4e624833d96bdafa1485ffff472509">  196</a></span><a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">Log_context::Log_context</a>(<a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp;&amp; src)</div>
<div class="line"><a id="l00197" name="l00197"></a><span class="lineno">  197</span>{</div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>  <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">operator=</a>(std::move(src));</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span>}</div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span> </div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span><a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">Log_context::operator=</a>(<span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; src) = <span class="keywordflow">default</span>;</div>
<div class="line"><a id="l00202" name="l00202"></a><span class="lineno">  202</span> </div>
<div class="line"><a id="l00203" name="l00203"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#aae857197aecba8606c32296bc7bec308">  203</a></span><a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">Log_context::operator=</a>(<a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp;&amp; src)</div>
<div class="line"><a id="l00204" name="l00204"></a><span class="lineno">  204</span>{</div>
<div class="line"><a id="l00205" name="l00205"></a><span class="lineno">  205</span>  <span class="keyword">using </span><a class="code hl_function" href="namespaceflow_1_1log.html#a1b475cd2cc2e476aa96c002927bf1690">std::swap</a>;</div>
<div class="line"><a id="l00206" name="l00206"></a><span class="lineno">  206</span> </div>
<div class="line"><a id="l00207" name="l00207"></a><span class="lineno">  207</span>  <span class="keywordflow">if</span> (&amp;src != <span class="keyword">this</span>)</div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno">  208</span>  {</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>    <a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#af13297446a54d6d80eb33d8fc672c10f">m_logger</a> = 0;</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span>    <a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#acf51230f139ac6f17748a02111b04086">m_component</a> = <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>();</div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span> </div>
<div class="line"><a id="l00212" name="l00212"></a><span class="lineno">  212</span>    <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a>(*<span class="keyword">this</span>, src);</div>
<div class="line"><a id="l00213" name="l00213"></a><span class="lineno">  213</span>  }</div>
<div class="line"><a id="l00214" name="l00214"></a><span class="lineno">  214</span>  <span class="keywordflow">return</span> *<span class="keyword">this</span>;</div>
<div class="line"><a id="l00215" name="l00215"></a><span class="lineno">  215</span>}</div>
<div class="line"><a id="l00216" name="l00216"></a><span class="lineno">  216</span> </div>
<div class="line"><a id="l00217" name="l00217"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">  217</a></span><a class="code hl_class" href="classflow_1_1log_1_1Logger.html">Logger</a>* <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">Log_context::get_logger</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00218" name="l00218"></a><span class="lineno">  218</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00219" name="l00219"></a><span class="lineno">  219</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#af13297446a54d6d80eb33d8fc672c10f">m_logger</a>;</div>
<div class="line"><a id="l00220" name="l00220"></a><span class="lineno">  220</span>}</div>
<div class="line"><a id="l00221" name="l00221"></a><span class="lineno">  221</span> </div>
<div class="line"><a id="l00222" name="l00222"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">  222</a></span><span class="keyword">const</span> <a class="code hl_class" href="classflow_1_1log_1_1Component.html">Component</a>&amp; <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">Log_context::get_log_component</a>()<span class="keyword"> const</span></div>
<div class="line"><a id="l00223" name="l00223"></a><span class="lineno">  223</span><span class="keyword"></span>{</div>
<div class="line"><a id="l00224" name="l00224"></a><span class="lineno">  224</span>  <span class="keywordflow">return</span> <a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#acf51230f139ac6f17748a02111b04086">m_component</a>;</div>
<div class="line"><a id="l00225" name="l00225"></a><span class="lineno">  225</span>}</div>
<div class="line"><a id="l00226" name="l00226"></a><span class="lineno">  226</span> </div>
<div class="line"><a id="l00227" name="l00227"></a><span class="lineno"><a class="line" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">  227</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">Log_context::swap</a>(<a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; other)</div>
<div class="line"><a id="l00228" name="l00228"></a><span class="lineno">  228</span>{</div>
<div class="line"><a id="l00229" name="l00229"></a><span class="lineno">  229</span>  <span class="keyword">using </span><a class="code hl_function" href="namespaceflow_1_1log.html#a1b475cd2cc2e476aa96c002927bf1690">std::swap</a>;</div>
<div class="line"><a id="l00230" name="l00230"></a><span class="lineno">  230</span> </div>
<div class="line"><a id="l00231" name="l00231"></a><span class="lineno">  231</span>  <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a>(<a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#af13297446a54d6d80eb33d8fc672c10f">m_logger</a>, other.<a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#af13297446a54d6d80eb33d8fc672c10f">m_logger</a>);</div>
<div class="line"><a id="l00232" name="l00232"></a><span class="lineno">  232</span>  <a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a>(<a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#acf51230f139ac6f17748a02111b04086">m_component</a>, other.<a class="code hl_variable" href="classflow_1_1log_1_1Log__context.html#acf51230f139ac6f17748a02111b04086">m_component</a>);</div>
<div class="line"><a id="l00233" name="l00233"></a><span class="lineno">  233</span>}</div>
<div class="line"><a id="l00234" name="l00234"></a><span class="lineno">  234</span> </div>
<div class="line"><a id="l00235" name="l00235"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#a1b475cd2cc2e476aa96c002927bf1690">  235</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespaceflow_1_1log.html#a1b475cd2cc2e476aa96c002927bf1690">swap</a>(<a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; val1, <a class="code hl_class" href="classflow_1_1log_1_1Log__context.html">Log_context</a>&amp; val2)</div>
<div class="line"><a id="l00236" name="l00236"></a><span class="lineno">  236</span>{</div>
<div class="line"><a id="l00237" name="l00237"></a><span class="lineno">  237</span>  val1.<a class="code hl_function" href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">swap</a>(val2);</div>
<div class="line"><a id="l00238" name="l00238"></a><span class="lineno">  238</span>}</div>
<div class="line"><a id="l00239" name="l00239"></a><span class="lineno">  239</span> </div>
<div class="line"><a id="l00240" name="l00240"></a><span class="lineno">  240</span><span class="comment">// Sev implementations.</span></div>
<div class="line"><a id="l00241" name="l00241"></a><span class="lineno">  241</span> </div>
<div class="line"><a id="l00242" name="l00242"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501">  242</a></span>std::ostream&amp; <a class="code hl_function" href="namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501">operator&lt;&lt;</a>(std::ostream&amp; os, <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a> val)</div>
<div class="line"><a id="l00243" name="l00243"></a><span class="lineno">  243</span>{</div>
<div class="line"><a id="l00244" name="l00244"></a><span class="lineno">  244</span>  <span class="comment">// Note: Must satisfy istream_to_enum() requirements.</span></div>
<div class="line"><a id="l00245" name="l00245"></a><span class="lineno">  245</span>  <span class="keywordflow">switch</span> (val)</div>
<div class="line"><a id="l00246" name="l00246"></a><span class="lineno">  246</span>  {</div>
<div class="line"><a id="l00247" name="l00247"></a><span class="lineno">  247</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a9ed9d44ce5760f61ea506d5571343624">Sev::S_NONE</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;NONE&quot;</span>;</div>
<div class="line"><a id="l00248" name="l00248"></a><span class="lineno">  248</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac90b5a22c7659cc99e7a6d919a14b660">Sev::S_FATAL</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;FATAL&quot;</span>;</div>
<div class="line"><a id="l00249" name="l00249"></a><span class="lineno">  249</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04aac04e40d3b2f54f1f517d49594eb7849">Sev::S_ERROR</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;ERROR&quot;</span>;</div>
<div class="line"><a id="l00250" name="l00250"></a><span class="lineno">  250</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a4aee6034ce9dbc2b5c36f27c80abe021">Sev::S_WARNING</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;WARNING&quot;</span>;</div>
<div class="line"><a id="l00251" name="l00251"></a><span class="lineno">  251</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7">Sev::S_INFO</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;INFO&quot;</span>;</div>
<div class="line"><a id="l00252" name="l00252"></a><span class="lineno">  252</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04aa6874010df179b46ffec47aaf9bc1358">Sev::S_DEBUG</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;DEBUG&quot;</span>;</div>
<div class="line"><a id="l00253" name="l00253"></a><span class="lineno">  253</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a3ee808b04c34bf6c110e3754de277f7b">Sev::S_TRACE</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;TRACE&quot;</span>;</div>
<div class="line"><a id="l00254" name="l00254"></a><span class="lineno">  254</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a138fe9b2eb78ab00c84b21c4a6b48fed">Sev::S_DATA</a>: <span class="keywordflow">return</span> os &lt;&lt; <span class="stringliteral">&quot;DATA&quot;</span>;</div>
<div class="line"><a id="l00255" name="l00255"></a><span class="lineno">  255</span>    <span class="keywordflow">case</span> <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">Sev::S_END_SENTINEL</a>: assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;Should not be printing sentinel.&quot;</span>);</div>
<div class="line"><a id="l00256" name="l00256"></a><span class="lineno">  256</span>  }</div>
<div class="line"><a id="l00257" name="l00257"></a><span class="lineno">  257</span> </div>
<div class="line"><a id="l00258" name="l00258"></a><span class="lineno">  258</span>  assert(<span class="keyword">false</span> &amp;&amp; <span class="stringliteral">&quot;Looks like a corrupt/sentinel log::Sev value.  gcc would&#39;ve caught an incomplete switch().&quot;</span>);</div>
<div class="line"><a id="l00259" name="l00259"></a><span class="lineno">  259</span>  <span class="keywordflow">return</span> os;</div>
<div class="line"><a id="l00260" name="l00260"></a><span class="lineno">  260</span>}</div>
<div class="line"><a id="l00261" name="l00261"></a><span class="lineno">  261</span> </div>
<div class="line"><a id="l00262" name="l00262"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056">  262</a></span>std::istream&amp; <a class="code hl_function" href="namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056">operator&gt;&gt;</a>(std::istream&amp; is, <a class="code hl_enumeration" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">Sev</a>&amp; val)</div>
<div class="line"><a id="l00263" name="l00263"></a><span class="lineno">  263</span>{</div>
<div class="line"><a id="l00264" name="l00264"></a><span class="lineno">  264</span>  <span class="comment">// Range [NONE, END_SENTINEL); no match =&gt; NONE; allow for number instead of ostream&lt;&lt; string; case-insensitive.</span></div>
<div class="line"><a id="l00265" name="l00265"></a><span class="lineno">  265</span>  val = <a class="code hl_function" href="namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266">util::istream_to_enum</a>(&amp;is, <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a9ed9d44ce5760f61ea506d5571343624">Sev::S_NONE</a>, <a class="code hl_enumvalue" href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">Sev::S_END_SENTINEL</a>);</div>
<div class="line"><a id="l00266" name="l00266"></a><span class="lineno">  266</span>  <span class="keywordflow">return</span> is;</div>
<div class="line"><a id="l00267" name="l00267"></a><span class="lineno">  267</span>}</div>
<div class="line"><a id="l00268" name="l00268"></a><span class="lineno">  268</span> </div>
<div class="line"><a id="l00269" name="l00269"></a><span class="lineno">  269</span><span class="comment">// Free function implementations.</span></div>
<div class="line"><a id="l00270" name="l00270"></a><span class="lineno">  270</span> </div>
<div class="line"><a id="l00271" name="l00271"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#aaaaa1dcbf7c8dc99aceb2b6c217187fc">  271</a></span><span class="keywordtype">void</span> <a class="code hl_function" href="namespaceflow_1_1log.html#aaaaa1dcbf7c8dc99aceb2b6c217187fc">beautify_chrono_logger_this_thread</a>(<a class="code hl_class" href="classflow_1_1log_1_1Logger.html">Logger</a>* logger_ptr)</div>
<div class="line"><a id="l00272" name="l00272"></a><span class="lineno">  272</span>{</div>
<div class="line"><a id="l00273" name="l00273"></a><span class="lineno">  273</span>  <span class="keyword">using </span><a class="code hl_function" href="namespaceflow_1_1util.html#a0955a29930075ac1fe393896c089b911">util::beautify_chrono_ostream</a>;</div>
<div class="line"><a id="l00274" name="l00274"></a><span class="lineno">  274</span> </div>
<div class="line"><a id="l00275" name="l00275"></a><span class="lineno">  275</span>  <span class="keywordflow">if</span> (logger_ptr)</div>
<div class="line"><a id="l00276" name="l00276"></a><span class="lineno">  276</span>  {</div>
<div class="line"><a id="l00277" name="l00277"></a><span class="lineno">  277</span>    <a class="code hl_function" href="namespaceflow_1_1util.html#a0955a29930075ac1fe393896c089b911">beautify_chrono_ostream</a>(logger_ptr-&gt;<a class="code hl_function" href="classflow_1_1log_1_1Logger.html#ad6ead44c19a7b15111b2f77656a2ea31">this_thread_ostream</a>());</div>
<div class="line"><a id="l00278" name="l00278"></a><span class="lineno">  278</span>  }</div>
<div class="line"><a id="l00279" name="l00279"></a><span class="lineno">  279</span>}</div>
<div class="line"><a id="l00280" name="l00280"></a><span class="lineno">  280</span> </div>
<div class="line"><a id="l00281" name="l00281"></a><span class="lineno"><a class="line" href="namespaceflow_1_1log.html#a267187e63c6355704f547d794c776747">  281</a></span><span class="keywordtype">size_t</span> <a class="code hl_function" href="namespaceflow_1_1log.html#a267187e63c6355704f547d794c776747">deep_size</a>(<span class="keyword">const</span> <a class="code hl_struct" href="structflow_1_1log_1_1Msg__metadata.html">Msg_metadata</a>&amp; val)</div>
<div class="line"><a id="l00282" name="l00282"></a><span class="lineno">  282</span>{</div>
<div class="line"><a id="l00283" name="l00283"></a><span class="lineno">  283</span>  <span class="comment">// We&#39;re following the loose pattern explained at the end of Async_file_logger::mem_cost().</span></div>
<div class="line"><a id="l00284" name="l00284"></a><span class="lineno">  284</span> </div>
<div class="line"><a id="l00285" name="l00285"></a><span class="lineno">  285</span>  <span class="keyword">using </span><a class="code hl_function" href="namespaceflow_1_1util.html#a418b56a178c07100eef78da5c9d6ee7a">util::deep_size</a>;</div>
<div class="line"><a id="l00286" name="l00286"></a><span class="lineno">  286</span> </div>
<div class="line"><a id="l00287" name="l00287"></a><span class="lineno">  287</span>  <span class="comment">/* Reminder: exclude sizeof(val); include only non-shallow memory used on val&#39;s behalf; so</span></div>
<div class="line"><a id="l00288" name="l00288"></a><span class="lineno">  288</span><span class="comment">   * sum of deep_size(X), for each X that is (1) a member of Msg_metadata; and (2) has a deep_size(X) free function.</span></div>
<div class="line"><a id="l00289" name="l00289"></a><span class="lineno">  289</span><span class="comment">   * As of this writing there is just one: */</span></div>
<div class="line"><a id="l00290" name="l00290"></a><span class="lineno">  290</span>  <span class="keywordflow">return</span> <a class="code hl_function" href="namespaceflow_1_1log.html#a267187e63c6355704f547d794c776747">deep_size</a>(val.<a class="code hl_variable" href="structflow_1_1log_1_1Msg__metadata.html#a4588cf8c827944e5379c6ad1fd11d6db">m_call_thread_nickname</a>);</div>
<div class="line"><a id="l00291" name="l00291"></a><span class="lineno">  291</span>}</div>
<div class="line"><a id="l00292" name="l00292"></a><span class="lineno">  292</span> </div>
<div class="line"><a id="l00293" name="l00293"></a><span class="lineno">  293</span>} <span class="comment">// namespace flow::log</span></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html"><div class="ttname"><a href="classflow_1_1log_1_1Component.html">flow::log::Component</a></div><div class="ttdoc">A light-weight class, each object storing a component payload encoding an enum value from enum type o...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00839">log.hpp:840</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a146ce02cc7422b3a3bca07533536450e"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a146ce02cc7422b3a3bca07533536450e">flow::log::Component::operator=</a></div><div class="ttdeci">Component &amp; operator=(const Component &amp;src)</div><div class="ttdoc">Overwrites *this with a copy of src.</div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a287888e2943b312f4febc3e8e130fc80"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a287888e2943b312f4febc3e8e130fc80">flow::log::Component::enum_raw_t</a></div><div class="ttdeci">unsigned int enum_raw_t</div><div class="ttdoc">The type Payload must be enum class Payload : enum_raw_t: an enum type encoded via this integer type.</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00845">log.hpp:845</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a3c753f22e196c5f84718541ebb27dcac"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a3c753f22e196c5f84718541ebb27dcac">flow::log::Component::m_payload_type_or_null</a></div><div class="ttdeci">std::type_info const  * m_payload_type_or_null</div><div class="ttdoc">The typeid() of the Payload passed to the 1-arg constructor; if 0-arg ctor was used (empty() is true)...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01017">log.hpp:1017</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a3ff8ff4d75add447b3e10ded5430833d"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a3ff8ff4d75add447b3e10ded5430833d">flow::log::Component::payload_type</a></div><div class="ttdeci">const std::type_info &amp; payload_type() const</div><div class="ttdoc">Returns typeid(Payload), where Payload was the template param used when calling the originating one-a...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00174">log.cpp:174</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a5af2f66731c407bd519a873706bd04c4"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a5af2f66731c407bd519a873706bd04c4">flow::log::Component::empty</a></div><div class="ttdeci">bool empty() const</div><div class="ttdoc">Returns true if *this is as if default-constructed (a null Component); false if as if constructed via...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00169">log.cpp:169</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a5be216ad60f3e344a22151bdf4d8d8b6"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a5be216ad60f3e344a22151bdf4d8d8b6">flow::log::Component::m_payload_enum_raw_value</a></div><div class="ttdeci">enum_raw_t m_payload_enum_raw_value</div><div class="ttdoc">The internally stored integer representation of the enum value passed to the 1-arg constructor; meani...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01023">log.hpp:1023</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a899a7d2b0c5daa8e4d666d431b9bf48e"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a899a7d2b0c5daa8e4d666d431b9bf48e">flow::log::Component::payload_enum_raw_value</a></div><div class="ttdeci">enum_raw_t payload_enum_raw_value() const</div><div class="ttdoc">Returns the numeric value of the enum payload stored by this Component, originating in the one-arg co...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00180">log.cpp:180</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Component_html_a8c746035d0eea4a26d0982eabf63b713"><div class="ttname"><a href="classflow_1_1log_1_1Component.html#a8c746035d0eea4a26d0982eabf63b713">flow::log::Component::Component</a></div><div class="ttdeci">Component()</div><div class="ttdoc">Constructs a Component that stores no payload; meaning an unspecified-component Component that return...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00158">log.cpp:158</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html">flow::log::Log_context</a></div><div class="ttdoc">Convenience class that simply stores a Logger and/or Component passed into a constructor; and returns...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01609">log.hpp:1610</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_a5d628315d5a93908d47a281980d3113e"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#a5d628315d5a93908d47a281980d3113e">flow::log::Log_context::operator=</a></div><div class="ttdeci">Log_context &amp; operator=(const Log_context &amp;src)</div><div class="ttdoc">Assignment operator that behaves similarly to the copy constructor.</div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_a8a5fef42dc2cedf3c0d1a6e83beb2948"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#a8a5fef42dc2cedf3c0d1a6e83beb2948">flow::log::Log_context::get_log_component</a></div><div class="ttdeci">const Component &amp; get_log_component() const</div><div class="ttdoc">Returns reference to the stored Component object, particularly as many FLOW_LOG_*() macros expect.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00222">log.cpp:222</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_aa6bb8e4250586425631ef80063caf155"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#aa6bb8e4250586425631ef80063caf155">flow::log::Log_context::swap</a></div><div class="ttdeci">void swap(Log_context &amp;other)</div><div class="ttdoc">Swaps Logger pointers and Component objects held by *this and other.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00227">log.cpp:227</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_acf51230f139ac6f17748a02111b04086"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#acf51230f139ac6f17748a02111b04086">flow::log::Log_context::m_component</a></div><div class="ttdeci">Component m_component</div><div class="ttdoc">The held Component object. Making the object non-const to allow operator=() to work.</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01712">log.hpp:1712</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_ae7100d2dd130d8f130e3e64fdb1f4fd9"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#ae7100d2dd130d8f130e3e64fdb1f4fd9">flow::log::Log_context::Log_context</a></div><div class="ttdeci">Log_context(Logger *logger=0)</div><div class="ttdoc">Constructs Log_context by storing the given pointer to a Logger and a null Component.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00188">log.cpp:188</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_af13297446a54d6d80eb33d8fc672c10f"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#af13297446a54d6d80eb33d8fc672c10f">flow::log::Log_context::m_logger</a></div><div class="ttdeci">Logger * m_logger</div><div class="ttdoc">The held Logger pointer. Making the pointer itself non-const to allow operator=() to work.</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01710">log.hpp:1710</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Log__context_html_af4db395042b065b00398cd59845dcb4d"><div class="ttname"><a href="classflow_1_1log_1_1Log__context.html#af4db395042b065b00398cd59845dcb4d">flow::log::Log_context::get_logger</a></div><div class="ttdeci">Logger * get_logger() const</div><div class="ttdoc">Returns the stored Logger pointer, particularly as many FLOW_LOG_*() macros expect.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00217">log.cpp:217</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html">flow::log::Logger</a></div><div class="ttdoc">Interface that the user should implement, passing the implementing Logger into logging classes (Flow'...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01280">log.hpp:1284</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_a1ea9da10a13d3b422ba7162a13d7eeb1"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#a1ea9da10a13d3b422ba7162a13d7eeb1">flow::log::Logger::set_thread_info</a></div><div class="ttdeci">static void set_thread_info(std::string *call_thread_nickname, flow::util::Thread_id *call_thread_id)</div><div class="ttdoc">Same as set_thread_info_in_msg_metadata() but targets the given two variables as opposed to a Msg_met...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00125">log.cpp:125</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_a2d1a0283764e5f85abf00c7cee4c4e19"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#a2d1a0283764e5f85abf00c7cee4c4e19">flow::log::Logger::set_thread_info_in_msg_metadata</a></div><div class="ttdeci">static void set_thread_info_in_msg_metadata(Msg_metadata *msg_metadata)</div><div class="ttdoc">Loads msg_metadata-&gt;m_call_thread_nickname (if set) or else msg_metadata-&gt;m_call_thread_id,...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00144">log.cpp:144</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_a3e00a68f9086f1ef0f4e36b9f23f4d02"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#a3e00a68f9086f1ef0f4e36b9f23f4d02">flow::log::Logger::s_this_thread_nickname_ptr</a></div><div class="ttdeci">static boost::thread_specific_ptr&lt; std::string &gt; s_this_thread_nickname_ptr</div><div class="ttdoc">Thread-local storage for each thread's logged name (null pointer, which is default,...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01552">log.hpp:1552</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_a5600c71ccaa294650c7d34b596d90bf5"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#a5600c71ccaa294650c7d34b596d90bf5">flow::log::Logger::this_thread_set_logged_nickname</a></div><div class="ttdeci">static void this_thread_set_logged_nickname(util::String_view thread_nickname=util::String_view(), Logger *logger_ptr=0, bool also_set_os_name=true)</div><div class="ttdoc">Sets or unsets the current thread's logging-worthy string name; optionally sets the OS thread name (s...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00036">log.cpp:36</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_a93541a6407b8705a76c7a161c5289b10"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#a93541a6407b8705a76c7a161c5289b10">flow::log::Logger::this_thread_logged_name_os_manip</a></div><div class="ttdeci">static std::ostream &amp; this_thread_logged_name_os_manip(std::ostream &amp;os)</div><div class="ttdoc">ostream manipulator function that, if output via operator&lt;&lt; to an ostream, will cause the current thr...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00108">log.cpp:108</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Logger_html_ad6ead44c19a7b15111b2f77656a2ea31"><div class="ttname"><a href="classflow_1_1log_1_1Logger.html#ad6ead44c19a7b15111b2f77656a2ea31">flow::log::Logger::this_thread_ostream</a></div><div class="ttdeci">std::ostream * this_thread_ostream() const</div><div class="ttdoc">Returns the stream dedicated to the executing thread and this Logger, so that the caller can apply st...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00150">log.cpp:150</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Thread__local__string__appender_html_a4c67bd1c2f1ccc58288df86abda02d88"><div class="ttname"><a href="classflow_1_1log_1_1Thread__local__string__appender.html#a4c67bd1c2f1ccc58288df86abda02d88">flow::log::Thread_local_string_appender::get_this_thread_string_appender</a></div><div class="ttdeci">static Thread_local_string_appender * get_this_thread_string_appender(const util::Unique_id_holder &amp;source_obj_id)</div><div class="ttdoc">Returns a pointer to the exactly one Thread_local_string_appender object that is accessible from the ...</div><div class="ttdef"><b>Definition:</b> <a href="thread__lcl__str__appender_8cpp_source.html#l00033">thread_lcl_str_appender.cpp:33</a></div></div>
<div class="ttc" id="aclassflow_1_1log_1_1Thread__local__string__appender_html_a64383811f529af676dde0028f61831f7"><div class="ttname"><a href="classflow_1_1log_1_1Thread__local__string__appender.html#a64383811f529af676dde0028f61831f7">flow::log::Thread_local_string_appender::appender_ostream</a></div><div class="ttdeci">std::ostream * appender_ostream()</div><div class="ttdoc">Same as fresh_appender_ostream() but does not clear the result string, enabling piecemeal writing to ...</div><div class="ttdef"><b>Definition:</b> <a href="thread__lcl__str__appender_8cpp_source.html#l00107">thread_lcl_str_appender.cpp:107</a></div></div>
<div class="ttc" id="aerror_2error_8hpp_html_a019ee6e90802e444572dd78d312d6e23"><div class="ttname"><a href="error_2error_8hpp.html#a019ee6e90802e444572dd78d312d6e23">FLOW_ERROR_SYS_ERROR_LOG_WARNING</a></div><div class="ttdeci">#define FLOW_ERROR_SYS_ERROR_LOG_WARNING()</div><div class="ttdoc">Logs a warning about the (often errno-based or from a library) error code in sys_err_code.</div><div class="ttdef"><b>Definition:</b> <a href="error_2error_8hpp_source.html#l00269">error.hpp:269</a></div></div>
<div class="ttc" id="alog_8hpp_html"><div class="ttname"><a href="log_8hpp.html">log.hpp</a></div></div>
<div class="ttc" id="alog_8hpp_html_a325fdd4b5cf0be49b37d3b7b7c29070d"><div class="ttname"><a href="log_8hpp.html#a325fdd4b5cf0be49b37d3b7b7c29070d">FLOW_LOG_INFO</a></div><div class="ttdeci">#define FLOW_LOG_INFO(ARG_stream_fragment)</div><div class="ttdoc">Logs an INFO message into flow::log::Logger *get_logger() with flow::log::Component get_log_component...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00197">log.hpp:197</a></div></div>
<div class="ttc" id="alog_8hpp_html_a626c7dc4d3b4dc0b32a8aac8624d66bc"><div class="ttname"><a href="log_8hpp.html#a626c7dc4d3b4dc0b32a8aac8624d66bc">FLOW_LOG_WARNING</a></div><div class="ttdeci">#define FLOW_LOG_WARNING(ARG_stream_fragment)</div><div class="ttdoc">Logs a WARNING message into flow::log::Logger *get_logger() with flow::log::Component get_log_compone...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00152">log.hpp:152</a></div></div>
<div class="ttc" id="alog_8hpp_html_ae4b5d4fdd2eb052615620879dd74af95"><div class="ttname"><a href="log_8hpp.html#ae4b5d4fdd2eb052615620879dd74af95">FLOW_LOG_SET_CONTEXT</a></div><div class="ttdeci">#define FLOW_LOG_SET_CONTEXT(ARG_logger_ptr, ARG_component_payload)</div><div class="ttdoc">For the rest of the block within which this macro is instantiated, causes all FLOW_LOG_....</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l00405">log.hpp:405</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html"><div class="ttname"><a href="namespaceflow_1_1log.html">flow::log</a></div><div class="ttdoc">Flow module providing logging functionality.</div><div class="ttdef"><b>Definition:</b> <a href="async__file__logger_8cpp_source.html#l00027">async_file_logger.cpp:28</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a06c8c59ea6c9b36c25b9b8ef319ba501"><div class="ttname"><a href="namespaceflow_1_1log.html#a06c8c59ea6c9b36c25b9b8ef319ba501">flow::log::operator&lt;&lt;</a></div><div class="ttdeci">std::ostream &amp; operator&lt;&lt;(std::ostream &amp;os, Sev val)</div><div class="ttdoc">Serializes a log::Sev to a standard output stream.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00242">log.cpp:242</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a1b475cd2cc2e476aa96c002927bf1690"><div class="ttname"><a href="namespaceflow_1_1log.html#a1b475cd2cc2e476aa96c002927bf1690">flow::log::swap</a></div><div class="ttdeci">void swap(Log_context &amp;val1, Log_context &amp;val2)</div><div class="ttdoc">Log_context ADL-friendly swap: Equivalent to val1.swap(val2).</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00235">log.cpp:235</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a267187e63c6355704f547d794c776747"><div class="ttname"><a href="namespaceflow_1_1log.html#a267187e63c6355704f547d794c776747">flow::log::deep_size</a></div><div class="ttdeci">size_t deep_size(const Msg_metadata &amp;val)</div><div class="ttdoc">Estimate of memory footprint of the given value, including memory allocated on its behalf – but exclu...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00281">log.cpp:281</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a350b25cb85d91052c0fb3dd80d513056"><div class="ttname"><a href="namespaceflow_1_1log.html#a350b25cb85d91052c0fb3dd80d513056">flow::log::operator&gt;&gt;</a></div><div class="ttdeci">std::istream &amp; operator&gt;&gt;(std::istream &amp;is, Sev &amp;val)</div><div class="ttdoc">Deserializes a log::Sev from a standard input stream.</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00262">log.cpp:262</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04">flow::log::Sev</a></div><div class="ttdeci">Sev</div><div class="ttdoc">Enumeration containing one of several message severity levels, ordered from highest to lowest.</div><div class="ttdef"><b>Definition:</b> <a href="log__fwd_8hpp_source.html#l00223">log_fwd.hpp:224</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a138fe9b2eb78ab00c84b21c4a6b48fed"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a138fe9b2eb78ab00c84b21c4a6b48fed">flow::log::Sev::S_DATA</a></div><div class="ttdeci">@ S_DATA</div><div class="ttdoc">Message satisfies Sev::S_TRACE description AND contains variable-length structure (like packet,...</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a3ee808b04c34bf6c110e3754de277f7b"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a3ee808b04c34bf6c110e3754de277f7b">flow::log::Sev::S_TRACE</a></div><div class="ttdeci">@ S_TRACE</div><div class="ttdoc">Message indicates any condition that may occur with great frequency (thus verbose if logged).</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a4aee6034ce9dbc2b5c36f27c80abe021"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a4aee6034ce9dbc2b5c36f27c80abe021">flow::log::Sev::S_WARNING</a></div><div class="ttdeci">@ S_WARNING</div><div class="ttdoc">Message indicates a &quot;bad&quot; condition that is not frequent enough to be of severity Sev::S_TRACE.</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a6fba12db09e5bebfaa04f6372c41c2cf">flow::log::Sev::S_END_SENTINEL</a></div><div class="ttdeci">@ S_END_SENTINEL</div><div class="ttdoc">Not an actual value but rather stores the highest numerical payload, useful for validity checks.</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04a9ed9d44ce5760f61ea506d5571343624"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04a9ed9d44ce5760f61ea506d5571343624">flow::log::Sev::S_NONE</a></div><div class="ttdeci">@ S_NONE</div><div class="ttdoc">Sentinel log level that must not be specified for any actual message (at risk of undefined behavior s...</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04aa6874010df179b46ffec47aaf9bc1358"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04aa6874010df179b46ffec47aaf9bc1358">flow::log::Sev::S_DEBUG</a></div><div class="ttdeci">@ S_DEBUG</div><div class="ttdoc">Message indicates a condition with, perhaps, no significant perf impact if enabled (like Sev::S_INFO)...</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04aac04e40d3b2f54f1f517d49594eb7849"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04aac04e40d3b2f54f1f517d49594eb7849">flow::log::Sev::S_ERROR</a></div><div class="ttdeci">@ S_ERROR</div><div class="ttdoc">Message indicates a &quot;bad&quot; condition with &quot;worse&quot; impact than that of Sev::S_WARNING.</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac238793326fae17afcc849e96b96e8e7">flow::log::Sev::S_INFO</a></div><div class="ttdeci">@ S_INFO</div><div class="ttdoc">Message indicates a not-&quot;bad&quot; condition that is not frequent enough to be of severity Sev::S_TRACE.</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_a5c602384e6fe9d7642740ac2fae4ad04ac90b5a22c7659cc99e7a6d919a14b660"><div class="ttname"><a href="namespaceflow_1_1log.html#a5c602384e6fe9d7642740ac2fae4ad04ac90b5a22c7659cc99e7a6d919a14b660">flow::log::Sev::S_FATAL</a></div><div class="ttdeci">@ S_FATAL</div><div class="ttdoc">Message indicates a &quot;fatally bad&quot; condition, such that the program shall imminently abort,...</div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_aaaaa1dcbf7c8dc99aceb2b6c217187fc"><div class="ttname"><a href="namespaceflow_1_1log.html#aaaaa1dcbf7c8dc99aceb2b6c217187fc">flow::log::beautify_chrono_logger_this_thread</a></div><div class="ttdeci">void beautify_chrono_logger_this_thread(Logger *logger_ptr)</div><div class="ttdoc">Sets certain chrono-related formatting on the given Logger in the current thread that results in a co...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00271">log.cpp:271</a></div></div>
<div class="ttc" id="anamespaceflow_1_1log_html_ada740b2acb9b14ebf025883245c64357"><div class="ttname"><a href="namespaceflow_1_1log.html#ada740b2acb9b14ebf025883245c64357">flow::log::this_thread_sync_msg_metadata_ptr</a></div><div class="ttdeci">boost::thread_specific_ptr&lt; Msg_metadata &gt; this_thread_sync_msg_metadata_ptr</div><div class="ttdoc">Thread-local Msg_metadata object used by FLOW_LOG_WITHOUT_CHECKING() for an alleged perf bonus in the...</div><div class="ttdef"><b>Definition:</b> <a href="log_8cpp_source.html#l00028">log.cpp:28</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_a0955a29930075ac1fe393896c089b911"><div class="ttname"><a href="namespaceflow_1_1util.html#a0955a29930075ac1fe393896c089b911">flow::util::beautify_chrono_ostream</a></div><div class="ttdeci">void beautify_chrono_ostream(std::ostream *os_ptr)</div><div class="ttdoc">Sets certain chrono-related formatting on the given ostream that results in a consistent,...</div><div class="ttdef"><b>Definition:</b> <a href="util_8cpp_source.html#l00173">util.cpp:173</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_a0a4e7b2d3107bd630e0dc0c0b8f2e4de"><div class="ttname"><a href="namespaceflow_1_1util.html#a0a4e7b2d3107bd630e0dc0c0b8f2e4de">flow::util::Thread_id</a></div><div class="ttdeci">Thread::id Thread_id</div><div class="ttdoc">Short-hand for an OS-provided ID of a util::Thread.</div><div class="ttdef"><b>Definition:</b> <a href="util__fwd_8hpp_source.html#l00090">util_fwd.hpp:90</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_a18a29d6a6e65c3b96c52b5cad5971266"><div class="ttname"><a href="namespaceflow_1_1util.html#a18a29d6a6e65c3b96c52b5cad5971266">flow::util::istream_to_enum</a></div><div class="ttdeci">Enum istream_to_enum(std::istream *is_ptr, Enum enum_default, Enum enum_sentinel, bool accept_num_encoding, bool case_sensitive, Enum enum_lowest)</div><div class="ttdoc">Deserializes an enum class value from a standard input stream.</div><div class="ttdef"><b>Definition:</b> <a href="util_2util_8hpp_source.html#l00523">util.hpp:523</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_a418b56a178c07100eef78da5c9d6ee7a"><div class="ttname"><a href="namespaceflow_1_1util.html#a418b56a178c07100eef78da5c9d6ee7a">flow::util::deep_size</a></div><div class="ttdeci">size_t deep_size(const std::string &amp;val)</div><div class="ttdoc">Estimate of memory footprint of the given value, including memory allocated on its behalf – but exclu...</div><div class="ttdef"><b>Definition:</b> <a href="util_8cpp_source.html#l00186">util.cpp:186</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_a685b86585da2fa5186f51854e7ae1561"><div class="ttname"><a href="namespaceflow_1_1util.html#a685b86585da2fa5186f51854e7ae1561">flow::util::ostream_op_string</a></div><div class="ttdeci">std::string ostream_op_string(T const &amp;... ostream_args)</div><div class="ttdoc">Equivalent to ostream_op_to_string() but returns a new string by value instead of writing to the call...</div><div class="ttdef"><b>Definition:</b> <a href="util_2util_8hpp_source.html#l00381">util.hpp:381</a></div></div>
<div class="ttc" id="anamespaceflow_1_1util_html_ae4dc52186797094b3040379ff19124c9"><div class="ttname"><a href="namespaceflow_1_1util.html#ae4dc52186797094b3040379ff19124c9">flow::util::String_view</a></div><div class="ttdeci">Basic_string_view&lt; char &gt; String_view</div><div class="ttdoc">Commonly used char-based Basic_string_view. See its doc header.</div><div class="ttdef"><b>Definition:</b> <a href="string__view_8hpp_source.html#l00191">string_view.hpp:191</a></div></div>
<div class="ttc" id="anamespaceflow_html_a29eaaa9d0fac4ce87d8b969222dbed09"><div class="ttname"><a href="namespaceflow.html#a29eaaa9d0fac4ce87d8b969222dbed09">flow::Error_code</a></div><div class="ttdeci">boost::system::error_code Error_code</div><div class="ttdoc">Short-hand for a boost.system error code (which basically encapsulates an integer/enum error code and...</div><div class="ttdef"><b>Definition:</b> <a href="common_8hpp_source.html#l00508">common.hpp:508</a></div></div>
<div class="ttc" id="astructflow_1_1log_1_1Msg__metadata_html"><div class="ttname"><a href="structflow_1_1log_1_1Msg__metadata.html">flow::log::Msg_metadata</a></div><div class="ttdoc">Simple data store containing all of the information generated at every logging call site by flow::log...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01040">log.hpp:1041</a></div></div>
<div class="ttc" id="astructflow_1_1log_1_1Msg__metadata_html_a278ef30d1bdceb9482c0aef097177c91"><div class="ttname"><a href="structflow_1_1log_1_1Msg__metadata.html#a278ef30d1bdceb9482c0aef097177c91">flow::log::Msg_metadata::m_call_thread_id</a></div><div class="ttdeci">util::Thread_id m_call_thread_id</div><div class="ttdoc">Thread ID of the thread from which the log call was invoked; or a default-constructed (no-thread) suc...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01137">log.hpp:1137</a></div></div>
<div class="ttc" id="astructflow_1_1log_1_1Msg__metadata_html_a4588cf8c827944e5379c6ad1fd11d6db"><div class="ttname"><a href="structflow_1_1log_1_1Msg__metadata.html#a4588cf8c827944e5379c6ad1fd11d6db">flow::log::Msg_metadata::m_call_thread_nickname</a></div><div class="ttdeci">std::string m_call_thread_nickname</div><div class="ttdoc">Thread nickname, as for Logger::this_thread_set_logged_nickname(), of the thread from which the log c...</div><div class="ttdef"><b>Definition:</b> <a href="log_8hpp_source.html#l01127">log.hpp:1127</a></div></div>
<div class="ttc" id="autil__fwd_8hpp_html"><div class="ttname"><a href="util__fwd_8hpp.html">util_fwd.hpp</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Fri Mar 28 2025 22:55:35 for Flow by&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4
</small></address>
</body>
</html>
